package com.libc.yygh.hosp;


import com.libc.yygh.common.LoggerUtil;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;

import java.time.Instant;
import java.time.ZoneOffset;
import java.time.temporal.ChronoUnit;


/**
 * *
 *
 * @version 1.0<br>
 * @packagename: com.libc.yygh.hosp<br>
 * @author: LiBencheng<br>
 * @computer: licheng<br>
 * @date: Created on 2022/3/17$14:39<br>
 */
// @EnableSwagger2
@MapperScan (basePackages = {"com.libc.yygh.hosp.mapper"})
/** 表示取消数据源的自动配置 */
// @SpringBootApplication (exclude = {DataSourceAutoConfiguration.class})
@SpringBootApplication
@ComponentScan (basePackages = "com.libc.yygh")
@EnableDiscoveryClient
@EnableFeignClients (basePackages = "com.libc.yygh")
public class ServiceHospApplication
{
    public static void main(String[] args)
    {
        // String value="2020-04-05";
        // System.err.println(DateUtilbc.isValidDateTime(value));
        Instant startTime = Instant.now();
        System.err.println("开始启动：" + startTime.atOffset(ZoneOffset.ofHours(8)));
        System.setProperty("starttime", startTime.getEpochSecond() + "");
        SpringApplication.run(ServiceHospApplication.class, args);
        System.err.println(LoggerUtil.getBeautyWomanStr());
        System.err.println(LoggerUtil.getSystemInfo());
        System.err.println(String.format("启动完成时间是：{[%s]}一共运行：{[%s ms]}\r\n",
                                         Instant.now().atOffset(ZoneOffset.ofHours(8)),
                                         ChronoUnit.MILLIS.between(startTime, Instant.now())));
        System.err.println(LoggerUtil.getSplitLine());
    }
}
